package lesson20;

public class ExceptionDemo {
	
	public static void main(String[] args) {
		
		Person ivan = new Person();
		Person maria = new Person();
		
		try {
			ivan.hasSameName(maria);
		} catch (PersonException e) {
			System.out.println("Error message: GREDA!");
		}
		System.out.println("Ivan and Maria");
		
	}

}
